using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkAnalystTools._Analysis
{
    /// <summary>
    /// <para>Make OD Cost Matrix Analysis Layer</para>
    /// <para>Makes an origin–destination (OD) cost matrix network analysis layer and sets its analysis properties. An OD cost matrix analysis layer is useful for representing a matrix of costs going from a set of origin locations to a set of destination locations. The layer can be created using a local network dataset or a service hosted online or in a portal.</para>
    /// <para>创建始发地-目的地 （OD） 成本矩阵网络分析图层并设置其分析属性。OD 成本矩阵分析图层可用于表示从一组始发位置到一组目标位置的成本矩阵。可以使用本地网络数据集或在线或门户中托管的服务来创建图层。</para>
    /// </summary>    
    [DisplayName("Make OD Cost Matrix Analysis Layer")]
    public class MakeODCostMatrixAnalysisLayer : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public MakeODCostMatrixAnalysisLayer()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_network_data_source">
        /// <para>Network Data Source</para>
        /// <para>The network dataset or service on which the network analysis will be performed. Use the portal URL for a service.</para>
        /// <para>将对其执行网络分析的网络数据集或服务。使用服务的门户 URL。</para>
        /// </param>
        public MakeODCostMatrixAnalysisLayer(object _network_data_source)
        {
            this._network_data_source = _network_data_source;
        }
        public override string ToolboxName => "Network Analyst Tools";

        public override string ToolName => "Make OD Cost Matrix Analysis Layer";

        public override string CallName => "na.MakeODCostMatrixAnalysisLayer";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_network_data_source, _layer_name, _travel_mode, _cutoff, _number_of_destinations_to_find, _time_of_day, _time_zone.GetGPValue(), _line_shape.GetGPValue(), _accumulate_attributes, _out_network_analysis_layer];

        /// <summary>
        /// <para>Network Data Source</para>
        /// <para>The network dataset or service on which the network analysis will be performed. Use the portal URL for a service.</para>
        /// <para>将对其执行网络分析的网络数据集或服务。使用服务的门户 URL。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Network Data Source")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _network_data_source { get; set; }


        /// <summary>
        /// <para>Layer Name</para>
        /// <para>The name of the network analysis layer to create.</para>
        /// <para>要创建的网络分析图层的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Layer Name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _layer_name { get; set; } = null;


        /// <summary>
        /// <para>Travel Mode</para>
        /// <para><xdoc>
        ///   <para>The name of the travel mode to use in the analysis. The travel mode represents a collection of network settings, such as travel restrictions and U-turn policies, that determine how a pedestrian, car, truck, or other medium of transportation moves through the network. Travel modes are defined on your network data source.</para>
        ///   <para>An arcpy.na.TravelMode object and a string containing the valid JSON representation of a travel mode can also be used as input to the parameter.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要在分析中使用的出行模式的名称。出行模式表示一组网络设置，例如出行限制和 U 形转弯策略，这些设置决定了行人、汽车、卡车或其他交通工具在网络中的移动方式。出行模式是在网络数据源上定义的。</para>
        ///   <para>还可以将 arcpy.na.TravelMode 对象和包含出行模式的有效 JSON 表示形式的字符串用作参数的输入。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Travel Mode")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _travel_mode { get; set; } = null;


        /// <summary>
        /// <para>Cutoff</para>
        /// <para>The impedance value at which to stop searching for destinations for a given origin. This value will be in the units of the impedance attribute used by your chosen travel mode. No destinations beyond this limit will be found. This cutoff value can be overridden on a per-origin basis by specifying individual cutoff values in the origins sublayer. By default, no cutoff is used for the analysis.</para>
        /// <para>停止搜索给定源的目的地的阻抗值。此值将采用所选出行模式使用的阻抗属性的单位。不会找到超出此限制的目的地。通过在原点子图层中指定单个截止值，可以基于每个原点覆盖此截止值。默认情况下，分析不使用截止值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Cutoff")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _cutoff { get; set; } = null;


        /// <summary>
        /// <para>Number of Destinations to Find</para>
        /// <para>The number of destinations to find per origin. This default can be overridden by specifying an individual value for the TargetDestinationCount property in the origins sublayer. By default, no limit is used, and all destinations are found.</para>
        /// <para>每个起点要查找的目的地数。可以通过在 origins 子图层中为 TargetDestinationCount 属性指定单个值来覆盖此默认值。默认情况下，不使用限制，并找到所有目标。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of Destinations to Find")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long? _number_of_destinations_to_find { get; set; } = null;


        /// <summary>
        /// <para>Time of Day</para>
        /// <para><xdoc>
        ///   <para>Indicates the departure time from origins.</para>
        ///   <para>If you have chosen a traffic-based impedance attribute, the solution will be generated given dynamic traffic conditions at the time of day specified here. A date and time can be specified as 5/14/2012 10:30 AM.</para>
        ///   <para>Instead of using a particular date, a day of the week can be specified using the following dates:
        ///   <bulletList>
        ///     <bullet_item>Today—12/30/1899  </bullet_item><para/>
        ///     <bullet_item>Sunday—12/31/1899  </bullet_item><para/>
        ///     <bullet_item>Monday—1/1/1900  </bullet_item><para/>
        ///     <bullet_item>Tuesday—1/2/1900  </bullet_item><para/>
        ///     <bullet_item>Wednesday—1/3/1900  </bullet_item><para/>
        ///     <bullet_item>Thursday—1/4/1900  </bullet_item><para/>
        ///     <bullet_item>Friday—1/5/1900  </bullet_item><para/>
        ///     <bullet_item>Saturday—1/6/1900  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指示从原点出发的时间。</para>
        ///   <para>如果选择了基于流量的阻抗属性，则将在此处指定的一天中的时间根据动态流量条件生成解决方案。日期和时间可以指定为 2012 年 5 月 14 日上午 10：30。</para>
        /// 可以使用<para>以下日期指定星期几，而不是使用特定日期：
        ///   <bulletList>
        ///     <bullet_item>今天 - 1899 年 12 月 30 日</bullet_item><para/>
        ///     <bullet_item>星期日—1899年12月31日</bullet_item><para/>
        ///     <bullet_item>星期一 - 1/1/1900</bullet_item><para/>
        ///     <bullet_item>星期二 - 1/2/1900</bullet_item><para/>
        ///     <bullet_item>星期三 - 1/3/1900</bullet_item><para/>
        ///     <bullet_item>星期四—1/4/1900</bullet_item><para/>
        ///     <bullet_item>星期五 - 1/5/1900</bullet_item><para/>
        ///     <bullet_item>星期六 - 1/6/1900</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time of Day")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_of_day { get; set; } = null;


        /// <summary>
        /// <para>Time Zone</para>
        /// <para><xdoc>
        ///   <para>The time zone of the Time of Day parameter.</para>
        ///   <bulletList>
        ///     <bullet_item>Local time at locations—The Time of Day parameter refers to the time zone in which the origins are located. This is the default.</bullet_item><para/>
        ///     <bullet_item>UTC—The Time of Day parameter refers to Coordinated Universal Time (UTC). Choose this option if you want to calculate your OD cost matrix for a specific time, such as now, but aren't certain in which time zone the origins will be located.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>时间参数的时区。</para>
        ///   <bulletList>
        ///     <bullet_item>位置的本地时间 - 时间参数是指源所在的时区。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>UTC - 时间参数是指协调世界时 （UTC）。如果要计算特定时间（例如现在）的 OD 成本矩阵，但不确定源将位于哪个时区，请选择此选项。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time Zone")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _time_zone_value _time_zone { get; set; } = _time_zone_value._LOCAL_TIME_AT_LOCATIONS;

        public enum _time_zone_value
        {
            /// <summary>
            /// <para>UTC</para>
            /// <para>UTC—The Time of Day parameter refers to Coordinated Universal Time (UTC). Choose this option if you want to calculate your OD cost matrix for a specific time, such as now, but aren't certain in which time zone the origins will be located.</para>
            /// <para>UTC - 时间参数是指协调世界时 （UTC）。如果要计算特定时间（例如现在）的 OD 成本矩阵，但不确定源将位于哪个时区，请选择此选项。</para>
            /// </summary>
            [Description("UTC")]
            [GPEnumValue("UTC")]
            _UTC,

            /// <summary>
            /// <para>Local time at locations</para>
            /// <para>Local time at locations—The Time of Day parameter refers to the time zone in which the origins are located. This is the default.</para>
            /// <para>位置的本地时间 - 时间参数是指源所在的时区。这是默认设置。</para>
            /// </summary>
            [Description("Local time at locations")]
            [GPEnumValue("LOCAL_TIME_AT_LOCATIONS")]
            _LOCAL_TIME_AT_LOCATIONS,

        }

        /// <summary>
        /// <para>Line Shape</para>
        /// <para><xdoc>
        ///   <bulletList>
        ///     <bullet_item>No lines—No shape will be generated for the output origin-destination route pair. This is useful when you have a large number of origins and destinations and are interested only in the impedance costs in the OD cost matrix table, not in visualizing your OD cost matrix in a map.</bullet_item><para/>
        ///     <bullet_item>Straight lines—The output route shape will be a single straight line between each of the origin-destination pairs. This is the default.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>No matter which output shape type is chosen, the best route is always determined by the network impedance, never Euclidean distance. This means that only the route shapes are different, not the underlying traversal of the network.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <bulletList>
        ///     <bullet_item>无线—不会为输出起点-目标路径对生成任何形状。当您有大量起点和终点，并且只对 OD 成本矩阵表中的阻抗成本感兴趣，而对在地图中可视化 OD 成本矩阵不感兴趣时，这很有用。</bullet_item><para/>
        ///     <bullet_item>直线—输出路径形状将为每个起点-目标对之间的一条直线。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>无论选择哪种输出形状类型，最佳路由始终由网络阻抗决定，而不是欧几里得距离。这意味着只有路由形状不同，而网络的基础遍历不同。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Line Shape")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _line_shape_value _line_shape { get; set; } = _line_shape_value._STRAIGHT_LINES;

        public enum _line_shape_value
        {
            /// <summary>
            /// <para>No lines</para>
            /// <para>No lines—No shape will be generated for the output origin-destination route pair. This is useful when you have a large number of origins and destinations and are interested only in the impedance costs in the OD cost matrix table, not in visualizing your OD cost matrix in a map.</para>
            /// <para>无线—不会为输出起点-目标路径对生成任何形状。当您有大量起点和终点，并且只对 OD 成本矩阵表中的阻抗成本感兴趣，而对在地图中可视化 OD 成本矩阵不感兴趣时，这很有用。</para>
            /// </summary>
            [Description("No lines")]
            [GPEnumValue("NO_LINES")]
            _NO_LINES,

            /// <summary>
            /// <para>Straight lines</para>
            /// <para>Straight lines—The output route shape will be a single straight line between each of the origin-destination pairs. This is the default.</para>
            /// <para>直线—输出路径形状将为每个起点-目标对之间的一条直线。这是默认设置。</para>
            /// </summary>
            [Description("Straight lines")]
            [GPEnumValue("STRAIGHT_LINES")]
            _STRAIGHT_LINES,

        }

        /// <summary>
        /// <para>Accumulate Attributes</para>
        /// <para><xdoc>
        ///   <para>A list of cost attributes to be accumulated during analysis. These accumulated attributes are for reference only; the solver only uses the cost attribute used by your designated travel mode when solving the analysis.</para>
        ///   <para>For each cost attribute that is accumulated, a Total_[Impedance] property is populated in the network analysis output features.</para>
        ///   <para>This parameter is not available if the network data source is an ArcGIS Online service or the network data source is a service on a version of Portal for ArcGIS that does not support accumulation.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>在分析期间要累积的成本属性列表。这些累积属性仅供参考;求解器在求解分析时仅使用指定出行模式使用的成本属性。</para>
        ///   <para>对于累积的每个成本属性，将在网络分析输出要素中填充一个 Total_[Impedance] 属性。</para>
        ///   <para>如果网络数据源是 ArcGIS Online 服务，或者网络数据源是不支持累积的 Portal for ArcGIS 版本上的服务，则此参数不可用。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Accumulate Attributes")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _accumulate_attributes { get; set; } = null;


        /// <summary>
        /// <para>Network Analyst Layer</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Network Analyst Layer")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_network_analysis_layer { get; set; }


        public MakeODCostMatrixAnalysisLayer SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}